Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udl #13

Open
wants to merge 8 commits into
base: 7.10
Choose a base branch
from
Open

Udl #13

wants to merge 8 commits into from

Conversation

zzOzz
Copy link

@zzOzz zzOzz commented Dec 15, 2017

J'ai supprimé la partie ShibbolethUserMapping et déplacé la mise en place des droits utilisateurs
dans ShibboInviteObject.java en ajoutant l'url
shibboInvite/shibboleth?RequestId=xxxxxx
de cette façon même si l'email ou l'identifiant shibboleth de l'utilisateur sont différents de celui de l'invitation les droits correctes seront affectés.

@CLAassistant
Copy link

CLAassistant commented Dec 15, 2017

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@nuxeojenkins
Copy link
Contributor

From the blame information on this pull request, potential reviewers: @vpasquier

Copy link
Contributor

@funshodavid funshodavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Commits should be squashed

  • As a thought, the goal here is to go through this mapper only in the case of an invitation. Instead of moving the code and deprecate the mapper, we can check if this can be done in the ShibbolethAuthenticationPlugin (where we always go through the mapper if defined). Otherwise change to what was done in the PR.

.gitignore Outdated
@@ -12,6 +12,8 @@ pojo-bin
seam-bin
deploy.sh
log/
.idea
nuxeo-shibboleth-invitation.iml

*.pyc
*~
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be removed from the commit.

pom.xml Outdated
<groupId>org.nuxeo.shibboleth.invitation</groupId>
<artifactId>nuxeo-shibboleth-invitation</artifactId>
<groupId>${marketplace.bundle.groupId}</groupId>
<artifactId>nuxeo-shibboleth-invitation-udl</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original groupId/artifactId should be set back.

import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wildcard imports shouldn't be used.

ShibbolethAuthenticationService shiboService = Framework.getService(ShibbolethAuthenticationService.class);
final String userID = shiboService.getUserID(httpServletRequest);
log.trace("userID:" + userID);
log.trace("getUserInfoUsernameField:" +Framework.getLocalService(UserRegistrationService.class).getConfiguration(DEFAULT_REGISTRATION).getUserInfoUsernameField());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Framework.getService can in fact directly be used.

return getView("UserCreated").arg("data", registrationData)
.arg("redirectUrl", "/nuxeo/site/shibboleth?requestedUrl=")
.arg("isShibbo", isShibbo);
String validationRelUrl = "https://nuxeo.universite-lyon.fr/" + usr.getConfiguration(configurationName).getValidationRelUrl()+ "?isShibbo=true&RequestId="+requestId+"&ConfigurationName="+configurationName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This url should be refactored as it is specific to a use case.

this.roles = roles;
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Classes should be deprecated and not removed.

public String getTargetRepositoryName() {
return Framework.getService(RepositoryManager.class).getDefaultRepositoryName();
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for deprecation instead of removal.

@funshodavid
Copy link
Contributor

Let's wait for https://jira.nuxeo.com/browse/NXP-24076 to see if it fixes the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants